package com.ku.kill.service;

import com.ku.kill.error.BusinessException;
import com.ku.kill.service.model.PromoModel;

/**
 * @program: kill2
 * @description: 商品秒杀接口
 * @author: JokerKu
 * @create: 2020-04-03 16:36
 **/
public interface PromoService {
    //根据itemid获取即将进行或正在进行的秒杀活动
    PromoModel getPromoByItemId(Integer itemId);

    //活动发布
    void publishPromo(Integer promoId) throws BusinessException;

    //生成秒杀用的令牌
    String generateSecondKillToken(Integer promoId,Integer itemId,Integer userId) throws BusinessException;
}
